package com.zmx.doctor.view.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;

import com.zmx.doctor.BaseActivity;
import com.zmx.doctor.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 程序猿：胖胖祥
 * 时 间：2020/11/28  21:40
 * 功 能：选择开方模式
 */
public class SelectPrescriptionActivity extends BaseActivity {

    @BindView(R.id.button_a)
    Button button_a;
    @BindView(R.id.button_b)
    Button button_b;
    private Integer logo;
    private String ask_id, p_id,z_type,temp_id;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_select_prescription;
    }

    @Override
    protected void initViews() {

        ButterKnife.bind(this);
        setToolbar(R.id.tool_bar);

        logo = Integer.parseInt(getIntent().getStringExtra("logo"));

        ask_id = getIntent().getStringExtra("ask_id");
        p_id = getIntent().getStringExtra("p_id");
        z_type = this.getIntent().getStringExtra("z_type");
        temp_id = this.getIntent().getStringExtra("temp_id");


    }

    @OnClick({R.id.button_a, R.id.button_b})
    public void onViewClicked(View view) {

        Intent intent = new Intent();
        switch (view.getId()) {
            case R.id.button_a:

                intent.putExtra("logo",logo+"");
                intent.putExtra("type",0+"");
                intent.putExtra("z_type",z_type);
                intent.putExtra("ask_id", ask_id);
                intent.putExtra("p_id", p_id);
                intent.putExtra("temp_id", temp_id);
//                intent.setClass(mActivity, PrescribingActivity.class);
                intent.setClass(mActivity, NewPrescribingActivity.class);
                startActivity(intent);

                break;
            case R.id.button_b:
                intent.putExtra("logo",logo+"");
                intent.putExtra("type",1+"");
                intent.putExtra("ask_id", ask_id);
                intent.putExtra("z_type",z_type);
                intent.putExtra("p_id", p_id);
                intent.putExtra("temp_id", temp_id);
//                intent.setClass(mActivity, PrescribingActivity.class);
                intent.setClass(mActivity, NewPrescribingActivity.class);
                startActivity(intent);
                break;
        }
    }
}
